//package com.aya.mapper.model;
//
//import org.springframework.core.env.ConfigurableEnvironment;
//import org.springframework.core.env.MutablePropertySources;
//import org.springframework.core.io.support.ResourcePropertySource;
//import org.springframework.web.context.support.StandardServletEnvironment;
//import org.springframework.web.servlet.DispatcherServlet;
//
//import java.io.IOException;
//
//public class MyDispatcherServlet extends DispatcherServlet {
//    @Override
//    protected ConfigurableEnvironment createEnvironment() {
//        return new StandardServletEnvironment(){
//            @Override
//            protected void customizePropertySources(MutablePropertySources propertySources) {
//                try {
//                    propertySources.addLast(new ResourcePropertySource("classpath:config.properties"));
//                } catch (IOException e) {
//                    e.printStackTrace();
//                }
//                super.customizePropertySources(propertySources);
//
//            }
//        };
//    }
//}
